<?php
include_once 'ctype/base/baseType.php';

/**
 * Tipo de prueba
 */

class Prueba extends BaseType{
	var $properties = array(
		"title"			=> "Prueba",
		"description" 	=> "Contenido de prueba"
	);
	
	var $definition = array(
		"texto"	=> array(
			"field"			=> "text",
		
			"properties"	=> array(
				"title"			=> "Texto",
				"description"	=> "Descripción del campo descripción"
			)
		
		),
		"tags" => array(
			"field"		=> "tags",

			"properties"	=> array(
				"title"			=> "Etiquetas",
				"description"	=> "Descripción del campo descripción"
			)
		),
		"categorias"	=> array(
			"field"		=> "categories",
		
			"properties"	=> array(
				"title"			=> "Categorias",
				"description"	=> "Descripción del campo descripción",
				"multiple"		=> TRUE,
				"category"		=> "otro-nivel-mas"	
			)
		
		),
		"select"	=> array(
			"field"		=> "select",
		
			"properties"	=> array(
				"title"			=> "Select",
				"description"	=> "Descripción del campo descripción",
				"values"		=> array(
					"uno"	=> "Uno",
					"dos"	=> "Dos"
				)
			)
		
		),		
		"descripcion"	=> array(
			"field"		=> "textarea",
		
			"properties"	=> array(
				"title"			=> "Descripción",
				"description"	=> "Descripción del campo descripción"
			)
		
		),
		
		"thumbnail"	=> array(
			"field"		=> "imagen",
		
			"properties"	=> array(
				"title"				=> "Imagen",
				"description"		=> "Descripción del campo fichero",
				"upload_automatic"	=> "true",
				"multiple"			=> TRUE,
				"thumbnails"		=> array(
					"thumb_100_100" => array(
						"width"		=> 200,
						"height"	=> 100
					)
				)
			)
		
		),
		
		"wysiwyg"	=> array(
			"field"		=> "wysiwyg",
		
			"properties"	=> array(
				"title"			=> "Wysiwyg",
				"description"	=> "Descripción del campo descripción",
				"mode"			=> "advanced"
			)
		
		),
		"upload"	=> array(
			"field"		=> "upload",
		
			"properties"	=> array(
				"title"				=> "Fichero",
				"description"		=> "Descripción del campo fichero",
				"upload_automatic"	=> "true",
				"multiple"			=> TRUE
			)
		
		)
		,
		"contacto"	=> array(	// Bloque, ya que no se especifica ni field, ni type y tiene fields.
			"repeat"	=> TRUE,
		
			"properties"	=> array(
				"title"			=> "Contacto",
				"description"	=> "Desc contacto"
			),
			
			"fields"	=> array(				
				"nombre"	=> array(
					"field"			=> "text",
					"properties"	=> array(
						"title"			=> "Nombre",
						"description"	=> "Descripción del campo titulo"
					)
				),
				"email"	=> array(
					"field"		=> "text",		
				
					"properties"	=> array(
						"title"			=> "Email",
						"description"	=> "Descripción del campo descripción"
					)
				
				)
			)
		)		
	);
	
	function Prueba(){
		parent::BaseType();
	}
}
